<!DOCTYPE html>
<html style="overflow-x:auto;overflow-y:auto;">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<title>JAVIS电商用户行为分析与可视化平台</title>
	<script src="/static/manager/jquery-1.8.3.min.js" type="text/javascript"></script>
	<link href="/static/manager/bootstrap.min.css" type="text/css" rel="stylesheet" />
	<script src="/static/manager/bootstrap.min.js" type="text/javascript"></script>
	<link href="/static/manager/jeesite.css" type="text/css" rel="stylesheet" />
	<script src="/static/manager/jeesite.js" type="text/javascript"></script>
	<script type="text/javascript">
		$(document).ready(function() {

		});

		function delSpider(id){
			let r = confirm('确认要删除该条记录吗？');
			if(r == true){
				let url = "/manager/deleteOrderDetail/"+id;
				$.get(url, "json", function(data){
					if(data.msg == 'success'){
						alert('删除成功!');
						document.location.href = "/manager/orderDetailList/";
					}else{
						alert(data.msg);
					}
				});

			}
		}

	</script>
	<style>
		.table tr td{
			text-align:center;
		}
	</style>
</head>
<body>

	<ul class="nav nav-tabs">
		<li class="active"><a href="/manager/orderDetailList/">订单明细列表信息</a></li>
	</ul>
	<form id="searchForm" class="breadcrumb form-search" action="/manager/orderDetailList/" method="post">
		<ul class="ul-form">
			<li><label>订单编号：</label>
				<input id="detailId" name="detailId" class="input-medium" type="text" value="" maxlength="100">
			</li>
			<li><label>商品名称：</label>
				<input id="productName" name="productName" class="input-medium" type="text" value="" maxlength="100">
			</li>
			<li><label>行业类别：</label>
				<select id="industry" name="industry" htmlescape="false" maxlength="2" class="input-xlarge  select2-offscreen" tabindex="-1">
						<option value="">请选择</option>
						<option value="0">农业</option>
						<option value="1">电子</option>
						<option value="2">工业</option>
						<option value="3">服装</option>
						<option value="4">医疗</option>
						<option value="5">文学</option>
						<option value="6">互联网</option>
				</select>
			</li>
			<li class="btns"><input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"></li>
		</ul>
	</form>
	<table id="contentTable" class="table table-striped table-bordered table-condensed">
		<thead>
			<tr>
				<th>编号</th>
				<th>订单编号</th>
				<th>商品名称</th>
				<th>商品售价</th>
				<th>折扣价格</th>
				<th>商品数量</th>
				<th>商品规格</th>
				<th>所属行业</th>
				<th>所属门店</th>
				<th>商品总价</th>
				<th>操作</th>
			</tr>
		</thead>
		<tbody>
		{% for detail in objects.object_list %}
			<tr>
				<td>
					<a href="/manager/updateOrderDetail/{{detail.id}}">
						{{detail.id}}
					</a>
				</td>
				<td>
					<a href="/manager/updateOrder/{{detail.order.id}}">
						{{detail.order.id}}
					</a>
				</td>
				<td>
					{{detail.productName}}
				</td>
				<td>
					{{detail.salePrice}}
				</td>
				<td>
					{{detail.discountPrice}}
				</td>
			    <td>
					{{detail.numbers}}
				</td>
				<td>
					{{detail.variant}}
				</td>

				<td>
					{% if detail.industry == 0 %}
						农业
					{% elif detail.industry == 1 %}
						电子
					{% elif detail.industry == 2 %}
						工业
					{% elif detail.industry == 3 %}
						服装
					{% elif detail.industry == 4 %}
						医疗
					{% elif detail.industry == 5 %}
						文学
					{% elif detail.industry == 5 %}
						互联网
					{% else %}
						其它
					{% endif %}
           	 	</td>
            	<td>
					{{detail.shop.shopName}}
            	</td>
				<td>
					{{detail.totalMoney}}
				</td>
				<td>
					<a href="/manager/updateOrderDetail/{{detail.id}}">修改</a> &nbsp; &nbsp; &nbsp; &nbsp;
					<a href="javascript:void(0)" onclick="delSpider({{detail.id}})">删除</a>
				</td>
			</tr>
		{% endfor %}

		</tbody>
	</table>
	<div class="pagination">
		<ul>
			<li class="active">
				<a class="left" href="?page=1"> 首页 </a>
			</li>
			<!--上一页-->
			{% if objects.has_previous %}
			<li class="active">
				<a class="left" href="?page={{ objects.previous_page_number }}">« 上一页</a>
			</li>
			{% else %}
				<li class="disabled">
					<a class="left" href="javascript:void(0)">« 上一页</a>
				</li>
			{% endif %}

			<!-- 下一页 -->
			{% if objects.has_next %}
			<li class="active">
				<a class="right" href="?page={{ objects.next_page_number }}">下一页 »</a>
			</li>
			{% else %}
				<li class="disabled"><a href="javascript:void(0)">下一页 »</a></li>
			{% endif %}
			<li class="active">
				<a class="right" href="?page={{ paginator.num_pages }}"> 尾页 </a>
			</li>
			<li class="disabled controls"><a href="javascript:void(0)">当前 <input type="text" value="{{page}}" > / <input type="text" value="{{pageSize}}"> 条，共 {{total}} 条</a></li>
		</ul>
		<div style="clear:both;"></div>
	</div>

	<script type="text/javascript">//<!-- 无框架时，左上角显示菜单图标按钮。
		if(!(self.frameElement && self.frameElement.tagName=="IFRAME")){
			$("body").prepend("<i id=\"btnMenu\" class=\"icon-th-list\" style=\"cursor:pointer;float:right;margin:10px;\"></i><div id=\"menuContent\"></div>");
			$("#btnMenu").click(function(){
				top.$.jBox('get:/jeesite/a/sys/menu/treeselect;JSESSIONID=3baf732ded45486a8f110d13601a4c9b', {title:'选择菜单', buttons:{'关闭':true}, width:300, height: 350, top:10});
				//if ($("#menuContent").html()==""){$.get("/jeesite/a/sys/menu/treeselect", function(data){$("#menuContent").html(data);});}else{$("#menuContent").toggle(100);}
			});
		}//-->
	</script>

</body></html>